﻿Ext.define(Fsl.app.getAbsView('V01I003001X03'), {
    extend      : 'Ext.panel.Panel',
    alias       : Fsl.app.getAlias('V01I003001X03'),
	bodyStyle   : {
		background  : 'none'
    },
    initComponent: function () { 
		var me    = this;
	    me.items  = [{
				xtype           : 'fieldcontainer',
				layout          : 'hbox',
                combineErrors   : true,                    
                defaults        : {
                    margin      : '5 0 0 5',
                    labelWidth  : 50
                },
				items  			: [{ 
						xtype      : 'textfield',
						fieldLabel : 'ID',
						listeners  : {
							specialkey : function(field, e){
								if(e.getKey() == e.ENTER){
									var value = this.getValue(),
									status    = 'win-statusbar-v01i003001',
									filter    = Fsl.store.getFilter('S01I003001');
									filter.add('id', value).load(1, {
										callback: function(records, operation, success) {
											Fsl.severity.info(status, operation);
										}
									});
								}
							}
						}
					},{ 
						xtype      : 'textfield',
						fieldLabel : 'Name',
						listeners  : {
							specialkey : function(field, e){
								if(e.getKey() == e.ENTER){
									var value = this.getValue(),
									status    = 'win-statusbar-v01i003001',
									filter    = Fsl.store.getFilter('S01I003001');
									filter.add('nameEn', value).load(1, {
										callback: function(records, operation, success) {
											Fsl.severity.info(status, operation);
										}
									});
								}
							}
						}
					}
				]		
			}	
		];       
        me.callParent(arguments);
    }
   
});